package com.tarena.charging.order.pojo.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@TableName("charging_bill_success")
public class BillSuccessPO {

    @TableId(type = IdType.AUTO)
    private Integer id; // 编号

    @TableField(value = "bill_id")
    private String billId; // 订单号

    @TableField(value = "charging_capacity")
    private Integer chargingCapacity; // 充电量（kwh）

    @TableField(value = "electric_money")
    private BigDecimal electricMoney; // 电费

    @TableField(value = "service_money")
    private BigDecimal serviceMoney; // 服务费

    @TableField(value = "charging_duration")
    private Integer chargingDuration; // 充电时长

    @TableField(value = "user_id")
    private Integer userId; // 用户ID

    @TableField(value = "operator_id")
    private Integer operatorId; // 运营商ID

    @TableField(value = "station_id")
    private Integer stationId; // 场站ID

    @TableField(value = "gun_id")
    private Integer gunId; // 设备ID

    @TableField(value = "vehicle_id")
    private Integer vehicleId; // 车辆编号

    @TableField(value = "charging_start_time")
    private LocalDateTime chargingStartTime; // 充电开始时间

    @TableField(value = "charging_end_time")
    private LocalDateTime chargingEndTime; // 充电结束时间

    @TableField(value = "bill_status")
    private Integer billStatus; // 订单状态(1充电中 2正常结束 3异常结束 4欠费)

    @TableField(value = "pay_amount")
    private BigDecimal payAmount; // 支付金额

    @TableField(value = "pay_time")
    private LocalDateTime payTime; // 支付时间

    @TableField(value = "pay_channel")
    private Integer payChannel; // 支付渠道

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime; // 订单创建时间

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime; // 更新时间

    @TableField(value = "deleted")
    private Integer deleted; // 是否删除
}
